home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 2
/
Atari Mega Archive CD - Volume 2.iso
/
minix
/
up1510b.tgz
/
up1510b
/
src
/
fs
/
time.c.D
< prev
next >
Wrap
Text File
|
1990-07-25
|
2KB
|
75 lines
*** /tmp/,RCSt1022262 Wed Jul 25 13:49:09 1990
--- time.c Mon Jul 23 11:34:27 1990
***************
*** 8,21 ****
*/
! #include "../h/const.h"
! #include "../h/type.h"
! #include "../h/callnr.h"
! #include "../h/com.h"
! #include "../h/error.h"
! #include "const.h"
! #include "type.h"
#include "file.h"
#include "fproc.h"
- #include "glo.h"
#include "inode.h"
#include "param.h"
--- 8,16 ----
*/
! #include "fs.h"
! #include <minix/callnr.h>
! #include <minix/com.h>
#include "file.h"
#include "fproc.h"
#include "inode.h"
#include "param.h"
***************
*** 32,36 ****
register struct inode *rip;
register int r;
- extern struct inode *eat_path();
/* Temporarily open the file. */
--- 27,30 ----
***************
*** 41,46 ****
r = OK;
if (rip->i_uid != fp->fp_effuid && !super_user) r = EPERM;
if (r == OK) {
! rip->i_modtime = update_time;
rip->i_dirt = DIRTY;
}
--- 35,41 ----
r = OK;
if (rip->i_uid != fp->fp_effuid && !super_user) r = EPERM;
+ if (read_only(rip) != OK) r = EROFS; /* not even su can touch if R/O */
if (r == OK) {
! rip->i_mtime = updated_time;
rip->i_dirt = DIRTY;
}
***************
*** 59,64 ****
/* Perform the time(tp) system call. */
- extern real_time clock_time();
-
reply_l1 = clock_time(); /* return time in seconds */
return(OK);
--- 54,57 ----
***************
*** 90,94 ****
/* Perform the times(buffer) system call. */
! real_time t[4];
sys_times(who, t);
--- 83,87 ----
/* Perform the times(buffer) system call. */
! time_t t[4];
sys_times(who, t);